

//
//  Created by 穿云剑 on 14-6-6.

#import <Foundation/Foundation.h>

@interface NSDate (WQCalendarLogic)

- (NSUInteger)numberOfDaysInCurrentMonth;

- (NSUInteger)numberOfWeeksInCurrentMonth;

- (NSUInteger)weeklyOrdinality;

/**
 *  获取当前的年
 *
 *  @return 年份
 */
- (NSUInteger)getCurrentYear;

/**
 *  获取当前的月份
 *
 *  @return 月份
 */
- (NSUInteger)getCurrentMonth;

/**
 *  获取当前的月份英文的
 *
 *  @return 月份
 */
- (NSString *)getCurrentEnglishMonth;

/**
 *  获取当前的日
 *
 *  @return 日
 */
- (NSUInteger)getCurrentDay;

/**
 *  获取当前的小时
 *
 *  @return 小时
 */
- (NSUInteger)getCurrentHour;
/**
 *  获取当前的分钟
 *
 *  @return 分钟
 */
- (NSUInteger)getCurrentMinute;


- (NSDate *)firstDayOfCurrentMonth;

- (NSDate *)lastDayOfCurrentMonth;

- (NSDate *)dayInThePreviousMonth;

- (NSDate *)dayInTheFollowingMonth;

- (NSDate *)dayInTheFollowingMonth:(NSInteger)month;//获取当前日期之后的几个月

- (NSDate *)dayInTheFollowingDay:(NSInteger)day;//获取当前日期之后的几个天

- (NSDateComponents *)YMDComponents;

- (NSDate *)dateFromString:(NSString *)dateString;//NSString转NSDate

- (NSString *)stringFromDate:(NSDate *)date;//NSDate转NSString

+ (NSInteger)getDayNumbertoDay:(NSDate *)today beforDay:(NSDate *)beforday;

-(NSInteger)getWeekIntValueWithDate;

+ (BOOL)isCurrentDay:(NSDate *)aDate;

//判断日期是今天,明天,后天,周几
-(NSString *)compareIfTodayWithDate;
//通过数字返回星期几
+(NSString *)getWeekStringFromInteger:(NSInteger)week;
+ (NSDate *)dateFromString:(NSString *)dateString format:(NSString *)format;

+ (NSString *)stringFromDate:(NSDate *)date format:(NSString *)format;

- (NSString *)stringFromFormat:(NSString *)format;

+(NSDate *)lastDay:(NSDate *)date;
+(NSDate *)nextDay:(NSDate *)date;


@end
